Each time an entry address is encountered in the trace file , it s pushed onto the stack 每次在跟蹤文件中碰到一個(gè)入口地址時(shí),就將其壓入堆棧。
The address is a function entry address that is , this function was called ,那么這個(gè)地址就是一個(gè)函數(shù)的入口地址(也就是說,您正在調(diào)用這個(gè)函數(shù)) 。
If another entry address follows , it means that the address on the stack called the address last read from the trace file 如果后面緊接著是另外一個(gè)入口地址,這說明堆棧中的地址調(diào)用了這個(gè)剛從跟蹤文件處讀出的地址。
When longer call chains are involved , it becomes more complicated to know who called whom , so a simple solution is to maintain a stack of the entry addresses 當(dāng)涉及大量的調(diào)用鏈時(shí),就很難分析究竟是誰調(diào)用了誰,因此,一種簡單的解決方案是維護(hù)一個(gè)整個(gè)地址的堆棧。
So , if in the trace file you have an entry address followed by another entry address , you can infer that a called b . if an entry address is followed by an exit address , it s understood that function was called and then returned 因此,如果在跟蹤文件中有一個(gè)入口地址( a )緊跟著另外一個(gè)入口地址( b ) ,那么您就可以推斷是a調(diào)用了b 。如果一個(gè)入口地址( a )后面跟著一個(gè)出口地址( a ) ,那么就說明這個(gè)函數(shù)( a )被調(diào)用后就直接返回了。